package com.xyyhome.web.system.domain;

import javax.persistence.*;

/**
 * Created by ty850 on 2017/5/21.
 */
@Entity
@Table(name = "y_s_group", schema = "xyyhome", catalog = "")
public class YSGroup {
    private String ysgCode;
    private String ysgName;
    private String ysgType;
    private String ysgRemark;

    @Id
    @Column(name = "ysg_code", nullable = false, length = 36)
    public String getYsgCode() {
        return ysgCode;
    }

    public void setYsgCode(String ysgCode) {
        this.ysgCode = ysgCode;
    }

    @Basic
    @Column(name = "ysg_name", nullable = true, length = 36)
    public String getYsgName() {
        return ysgName;
    }

    public void setYsgName(String ysgName) {
        this.ysgName = ysgName;
    }

    @Basic
    @Column(name = "ysg_type", nullable = true, length = 10)
    public String getYsgType() {
        return ysgType;
    }

    public void setYsgType(String ysgType) {
        this.ysgType = ysgType;
    }

    @Basic
    @Column(name = "ysg_remark", nullable = true, length = 200)
    public String getYsgRemark() {
        return ysgRemark;
    }

    public void setYsgRemark(String ysgRemark) {
        this.ysgRemark = ysgRemark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        YSGroup ysGroup = (YSGroup) o;

        if (ysgCode != null ? !ysgCode.equals(ysGroup.ysgCode) : ysGroup.ysgCode != null) return false;
        if (ysgName != null ? !ysgName.equals(ysGroup.ysgName) : ysGroup.ysgName != null) return false;
        if (ysgType != null ? !ysgType.equals(ysGroup.ysgType) : ysGroup.ysgType != null) return false;
        if (ysgRemark != null ? !ysgRemark.equals(ysGroup.ysgRemark) : ysGroup.ysgRemark != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = ysgCode != null ? ysgCode.hashCode() : 0;
        result = 31 * result + (ysgName != null ? ysgName.hashCode() : 0);
        result = 31 * result + (ysgType != null ? ysgType.hashCode() : 0);
        result = 31 * result + (ysgRemark != null ? ysgRemark.hashCode() : 0);
        return result;
    }
}
